MImgButton – Image button that animates when pressed or activated. Uses pre-loaded sprites.
Creation: MImgButton_New(default sprite, selected sprite, mouseover sprite, disabled sprite, x, y)
default sprite – The index of the sprite in default button state.
selected sprite – The index of the sprite in selected button state. (defaults to default sprite if 0)
mouseover sprite – The index of the sprite in mouseover button state. (defaults to default sprite if 0)
disabled sprite – The index of the sprite in disabled button state. (defaults to default sprite if 0)
x – Pixel X coordinate for the top left corner of the button.
x – Pixel Y coordinate for the top left corner of the button.
Functions:
MImgButton_ClearSelected(index)
Clears the pressed status of the button.
MImgButton_Delete(index)
Deletes the button.
MImgButton_Disable(index)
Disables the button.
MImgButton_Draw(index)
Draws the button to screen.
MImgButton_Enable(index)
Enables the button.
MImgButton_GetSelected(index)
Returns whether button is pressed status. 0=no ; 1=yes